package com.springbootMybatis.dao;

import org.apache.ibatis.annotations.*;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;

import com.springbootMybatis.bean.DemoBean;

/**
 * 
 * DemoMybatisDao  
 * <p>mybatis操作类。</p> 
 * @author sunChangXing
 * @version v1.0.0
 * <p><B>last update </B> by sunChangXing @ 2018年1月11日</p>
 * @since v1.0.0
 */
@Mapper
@CacheConfig(cacheNames="demo")
public interface DemoMybatisDao {
	
    @Cacheable(key = "#p0")
    DemoBean findByName(String name);
    
    @CachePut(key = "#p0.name")
    DemoBean save(DemoBean user);
}
